package com.zhn.usermanager.pojo;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 用户表(User)实体类
 *
 * @author Robot
 * @since 2021-09-01 20:38:19
 * @version 1.0
 */
@ApiModel(value = "User",description = "用户表")
public class User implements Serializable {
    private static final long serialVersionUID = 464988387165473983L;
    /**
    * 用户id
    */
	@ApiModelProperty(name = "id",notes = "用户id",dataType = "Integer",required = true)
    private Integer id;
    /**
    * 手机号
    */
	@ApiModelProperty(name = "phone",notes = "手机号",dataType = "String",required = true)
    private String phone;
    /**
    * 邮箱
    */
	@ApiModelProperty(name = "email",notes = "邮箱",dataType = "String",required = true)
    private String email;
    /**
    * 身份证号
    */
	@ApiModelProperty(name = "idCord",notes = "身份证号",dataType = "String",required = true)
    private String idCord;
    /**
    * 密码
    */
	@ApiModelProperty(name = "password",notes = "密码",dataType = "String",required = true)
    private String password;
    /**
    * 用户名
    */
	@ApiModelProperty(name = "username",notes = "用户名",dataType = "String",required = true)
    private String username;
    /**
    * 年龄
    */
	@ApiModelProperty(name = "age",notes = "年龄",dataType = "Integer",required = true)
    private Integer age;
    /**
    * 最后登录时间
    */
	@ApiModelProperty(name = "lastlogintime",notes = "最后登录时间",dataType = "Date",required = true)
    // 接收字符串日期，转换为date对象，前端必须传递 "2020-06-20 01:01:01"  这样的格式
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    // 下面是服务器响应返回的内容，如果没有格式化转换，那么返回的内容是长毫秒数，接收mysql数据库中的数据也需要设置东八区+8时
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date lastlogintime;
    /**
    * 登录状态（0禁用 1启用 默认为1）
    */
	@ApiModelProperty(name = "action",notes = "登录状态（0禁用 1启用 默认为1）",dataType = "Integer",required = true)
    private Integer action;
    /**
    * 头像所在物理路径地址
    */
	@ApiModelProperty(name = "headstr",notes = "头像所在物理路径地址",dataType = "String",required = true)
    private String headstr;
    
	@ApiModelProperty(name = "departmentId",notes = "${column.comment}",dataType = "Integer",required = true)
    private Integer departmentId;

    @ApiModelProperty(name = "phoneCode",notes = "验证码",dataType = "String",required = true)
	private String phoneCode;

//    @ApiModelProperty(name = "codeTime",notes = "发送时间",dataType = "Date",required = true)
//    // 接收字符串日期，转换为date对象，前端必须传递 "2020-06-20 01:01:01"  这样的格式
//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
//    // 下面是服务器响应返回的内容，如果没有格式化转换，那么返回的内容是长毫秒数，接收mysql数据库中的数据也需要设置东八区+8时
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date codeTime;

    private String uuid;

    protected Department department;

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Date getCodeTime() {
        return codeTime;
    }

    public void setCodeTime(Date codeTime) {
        this.codeTime = codeTime;
    }

    public String getPhoneCode() {
        return phoneCode;
    }

    public void setPhoneCode(String phoneCode) {
        this.phoneCode = phoneCode;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
        
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
        
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
        
    public String getIdCord() {
        return idCord;
    }

    public void setIdCord(String idCord) {
        this.idCord = idCord;
    }
        
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
        
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
        
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
        
    public Date getLastlogintime() {
        return lastlogintime;
    }

    public void setLastlogintime(Date lastlogintime) {
        this.lastlogintime = lastlogintime;
    }
        
    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }
        
    public String getHeadstr() {
        return headstr;
    }

    public void setHeadstr(String headstr) {
        this.headstr = headstr;
    }
        
    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

}